
package org.movee.spring.data.hugegraph.annotation;

import org.movee.spring.data.hugegraph.schema.IdStrategy;
import org.springframework.data.annotation.Persistent;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Specifies the class as vertex in graph, with one optional label(String).
 */
@Persistent
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Vertex {
    /**
     * The label(gremlin reserved) of given Vertex, can add Vertex by label.
     * @return class name if not specify.
     */
    String label() default "Vertex";

    /**
     * vertex id generated strategy, support: automatic, customizeString, customizeInt, primaryKey
     * @return id strategy
     */
    IdStrategy idStrategy() default IdStrategy.AUTOMATIC;


    boolean enableLabelIndex() default false;

    Index[] indexes() default {};

    Unique[] uniqueConstraint() default {};
}
